package com.xian.cloud.resource;


import com.google.gson.Gson;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;
/**
 * @Author: xlr
 * @Date: Created in 上午12:40 2018/11/25
 */
@Data
@ConfigurationProperties(prefix = "wx.mp")
public class WxMpProperties {

    private static Gson gson = new Gson();

    private List<MpConfig> configs;

    @Data
    public static class MpConfig {
        /**
         * 设置微信公众号的appid
         */
        private String appId;

        /**
         * 设置微信公众号的app secret
         */
        private String secret;

        /**
         * 设置微信公众号的token
         */
        private String token;

        /**
         * 设置微信公众号的EncodingAESKey
         */
        private String aesKey;
    }

    @Override
    public String toString() {
        return gson.toJson(this);
    }
}
